Camera Data

This module provides access to Camera Data objects in Blender.

Example:

 from Blender import Camera, Object, Scene
 c = Camera.New('ortho').    # create new ortho camera data
 c.lens = 35.0               # set lens value
 cur = Scene.getCurrent().   # get current scene
 ob = Object.New('Camera').  # make camera object
 ob.link(c).                 # link camera data with this object
 cur.link(ob).               # link object into scene
 cur.setCurrentCamera(ob).   # make this camera the active";
    

Classes

Camera

This object gives access to Camera-specific data in Blender.

Function Summary

Blender Camera or a list of Blender Cameras

Get(name)

Get the Camera Data object(s) from Blender.

Blender Camera

New(type, name)

Create a new Camera Data object.

Function Details

Get(name=None)

Get the Camera Data object(s) from Blender.

Parameters:

name - The name of the Camera Data.

áááááááááá (type=string)

Returns:

It depends on the name parameter:

  • (name): The Camera Data object with the given name;

  • (): A list with all Camera Data objects in the current scene.

áááááááááá (type=Blender Camera or a list of Blender Cameras)

New(type='persp', name='CamData')

Create a new Camera Data object.

Parameters:

type - The Camera type: 'persp' or 'ortho'.

áááááááááá (type=string)

name - The Camera Data name.

áááááááááá (type=string)

Returns:

The created Camera Data object.

áááááááááá (type=Blender Camera)